home *** CD-ROM | disk | FTP | other *** search
- Path: dispatch.news.demon.net!demon!summat.demon.co.uk
- From: mike@summat.demon.co.uk (Mike Dodd)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Randomness
- Date: Wed, 17 Apr 1996 10:17:04 GMT
- Message-ID: <451.6681T677T994@summat.demon.co.uk>
- NNTP-Posting-Host: summat.demon.co.uk
- X-NNTP-Posting-Host: summat.demon.co.uk
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- Help !,
-
- Has anyone got a good algorithm for quickly calculating a "random" number ?
-
- I've tried the algorithm described in the autodocs for amiga.lib for
- "FastRand" :
-
- move.l RandomSeed,d0
- rol.l #1,d0
- eori.l #$1d872b41,d0
- move.l d0,RandomSeed
-
- but this produces a rather poor sequence of values...Soooerh, any better
- suggestions ?
-
- --
- Mike (mike@summat.demon.co.uk | fidonet@2:2500/73.10)
-
-
-